<header id="topbar" class="affix">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="<%= window.location.href %>">支付方式详情</a>
            </li>
            <li class="crumb-trail">编辑</li>
        </ol>
    </div>
    <div class="pull-right">
        <a href="javascript:;" class="btn btn-primary btn-sm light fw600 ml10" id='save'><span
                class="fa fa-save"></span>保存</a>
    </div>
</header>
<section id="content">
    <div class="panel">
        <form class="form-horizontal" id="container">
            <div class="form-group">
                <label for="inputIcon" class="col-md-1 control-label">图标</label>
                <div class="col-md-1" id="inputIcon">
                    <a href="<%= info.icon %>" class="image-popup">
                        <img src="<%= info.icon %>" alt="图像丢失" class="fix-icon" id="img1" data-field="icon">
                    </a>
                    <button id="uploadImg1" data-img="img1" class="form-control">更换图像</button>
                </div>
            </div>
            <div class="form-group">
                <label for="inputAbtest" class="col-md-1 control-label">灰度策略：</label>
                <div class="col-md-4">
                    <select data-field="abtest" data-type="int" class="form-control multiselect">
                        <option value="-1"
                        <%= info.abtest ? "" : "selected" %>>所有用户可见</option>
                        <% _.each(abtests, function(o){ %>
                        <option value="<%= o.id %>"
                        <%= o.id == info.abtest ? "selected" : "" %>><%= o.name %></option>
                        <% }) %>
                    </select>
                </div>
                <label for="inputStatus" class="col-md-1 control-label">状态：</label>
                <div class="col-md-4">
                    <select id="inputStatus" data-field="status" class="form-control multiselect">
                        <option value="0"
                        <%= info.status == 0 ? "selected" : "" %> >可用</option>
                        <option value="1"
                        <%= info.status == 1 ? "selected" : "" %> >不可用</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="inputTitle" class="col-md-1 control-label">名称：</label>
                <div class="col-md-4">
                    <input type="text" id="inputTitle" class="form-control" value="<%= info.title %>" data-field="title"
                           required>
                </div>
                <label for="inputLeastPay" class="col-md-1 control-label">最低支付：</label>
                <div class="col-md-4">
                    <input type="number" id="inputLeastPay" class="form-control" value="<%= info.least_pay %>"
                           data-field="least_pay" data-type="int">
                </div>
            </div>
            <div class="form-group">
                <label for="inputCategory" class="col-md-1 control-label">分类：</label>
                <div class="col-md-4">
                    <select data-field="category" id="inputCategory" class="form-control multiselect">
                        <% _.each(window.PAY_CATEGORY, function (value) { %>
                        <option
                        <%= info.category == value ? "selected" : "" %> value="<%= value %>"><%= value %></option>
                        <% }) %>
                    </select>
                </div>
                <label for="inputMaxPay" class="col-md-1 control-label">最高支付：</label>
                <div class="col-md-4">
                    <input type="number" id="inputMaxPay" class="form-control" value="<%= info.max_pay %>"
                           data-field="max_pay" data-type="int">
                </div>
            </div>

            <div class="form-group">
                <label for="inputPayType" class="col-md-1 control-label">类型：</label>
                <div class="col-md-4">
                    <select data-field="pay_type" id="inputPayType" class="form-control multiselect">
                        <% _.each(window.PAY_TYPE, function (value, index) { %>
                        <option
                        <%= info.pay_type == index ? "selected" : "" %> value="<%= index %>"><%= value %></option>
                        <% }) %>
                    </select>
                </div>
                <label for="inputHighlight" class="col-md-1 control-label">推荐：</label>
                <div class="col-md-4">
                    <select id="inputHighlight" data-field="highlight" class="form-control multiselect">
                        <option value="0"
                        <%= info.highlight == 0 ? "selected" : "" %> >否</option>
                        <option value="1"
                        <%= info.highlight == 1 ? "selected" : "" %> >是</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="inputDescShort" class="col-md-1 control-label">描述（短）：</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" data-field="desc_short" value="<%= info.desc_short %>"
                           id="inputDescShort" placeholder="行内显示">
                </div>
                <label for="inputDescLong" class="col-md-1 control-label">描述（长）：</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" data-field="desc_long" value="<%= info.desc_long %>"
                           id="inputDescLong" placeholder="底部显示">
                </div>
            </div>
            <div class="form-group">
                <label for="inputWeixinPubQr" class="col-md-1 control-label">微信二维码：</label>
                <div class="col-md-4" id="inputWeixinPubQr">
                    <a href="<%= info.weixin_pub_qr %>" class="image-popup">
                        <img src="<%= info.weixin_pub_qr %>" alt="图像丢失" class="fix-icon" id="img2"
                             data-field="weixin_pub_qr">
                    </a>
                    <button id="uploadImg2" data-img="img2" class="form-control">更换图像</button>
                </div>
                <label for="inputBonusRate" class="col-md-1 control-label">充值回馈百分比:</label>
                <div class="col-md-4">
                    <input type="number" class="form-control" data-field="bonus_rate" value="<%= info.bonus_rate %>"
                           id="inputBonusRate" placeholder="充值回馈百分比" data-type="int" max="100">
                </div>
            </div>
            <div class="form-group">
                <label for="inputWeixinPubAppid" class="col-md-1 control-label">微信公众号原始ID:</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" data-field="weixin_pub_appid"
                           value="<%= info.weixin_pub_appid %>" id="inputWeixinPubAppid"
                           placeholder="如果支付方式不是微信公众号支付，不需填写">
                </div>
                <label for="inputWeixinPubName" class="col-md-1 control-label">微信公众号名称：</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" data-field="weixin_pub_name"
                           value="<%= info.weixin_pub_name %>" id="inputWeixinPubName"
                           placeholder="如果支付方式不是微信公众号支付，不需填写">
                </div>
            </div>
            <div class="form-group">
                <label for="inputRemark" class="col-md-1 control-label">备注：</label>
                <div class="col-md-4">
                    <input id="inputRemark" type="text" class="form-control" data-field="remark"
                           value="<%= info.remark %>">
                </div>
            </div>
        </form>
    </div>
</section>
